package com.cet.programmercarl.algorithmperformancanalysis.字符串;

/**
 * @program: algorithm
 * @description: 字符串反转
 * @author: 陈恩涛
 * @create: 2022-03-19 10:31
 **/
public class LC344 {

    public static void reverseString(char[] s) {
        int left = 0;
        int right = s.length - 1;
        char temp;
        while (left < right) {
            temp = s[left];
            s[left] = s[right];
            s[right] = temp;
            left++;
            right--;
        }
    }
}
